﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PloobsEngine.Behaviors
{
    public class HardMovimentationUpdate : IUpdateable
    {
        public HardMovimentationUpdate(EngineStuff engine, IBehavior movimentation) : base(engine)
        {
            this.hmoviment = movimentation;               
        }

        private bool shouldUpdate = true;

        public bool ShouldUpdate
        {
            get { return shouldUpdate; }
            set { shouldUpdate = value; }
        }

        private IBehavior hmoviment;

        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {            
            if(shouldUpdate)
            this.hmoviment.PerformBehavior(null,null);

            shouldUpdate = true;
        }
    }
}
